package commands

type AllCloseCommand struct {
	closeCommands []Command
}

func CreateAllCloseCommand(closeCommands []Command) *AllCloseCommand {
	return &AllCloseCommand{closeCommands: closeCommands}
}

func (aoc *AllCloseCommand) Execute() {
	for _, com := range aoc.closeCommands {
		com.Execute()
	}
}

func (aoc *AllCloseCommand) Undo() {
	for _, com := range aoc.closeCommands {
		com.Undo()
	}
}
